// 注册弹窗专用样式
.register-modal {
  // 强制移除所有输入框边框和背景色
  .ant-input,
  .ant-input-password,
  .ant-select-selector,
  .ant-input-affix-wrapper,
  .ant-input-password-large,
  .ant-input-large,
  input {
    border: none !important;
    outline: none !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    
    &:focus,
    &.ant-input-focused,
    &:focus-within,
    &:focus-visible {
      border: none !important;
      outline: none !important;
      box-shadow: none !important;
      background: transparent !important;
      background-color: transparent !important;
    }
    
    // 移除浏览器自动填充的背景色
    &:-webkit-autofill,
    &:-webkit-autofill:hover,
    &:-webkit-autofill:focus,
    &:-webkit-autofill:active {
      -webkit-box-shadow: 0 0 0 30px transparent inset !important;
      -webkit-text-fill-color: inherit !important;
      background-color: transparent !important;
      background: transparent !important;
    }
  }
  .ant-modal-content {
    max-height: 80vh !important;
    padding: 0 !important;
    overflow: hidden;
  }
  
  .ant-modal-body {
    padding: 0 !important;
    height: 80vh;
    max-height: 80vh;
    overflow: hidden;
  }
  
  // 重置所有输入框样式
  .ant-input,
  .ant-input-password,
  .ant-select-selector,
  .ant-input-affix-wrapper {
    border-radius: 6px !important;
    border: none !important;
    outline: none !important;
    background: var(--color-bg-secondary) !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    
    // 内部input元素透明
    input {
      background: transparent !important;
      background-color: transparent !important;
      border: none !important;
      outline: none !important;
      
      // 移除浏览器自动填充的背景色
      &:-webkit-autofill,
      &:-webkit-autofill:hover,
      &:-webkit-autofill:focus,
      &:-webkit-autofill:active {
        -webkit-box-shadow: 0 0 0 30px transparent inset !important;
        -webkit-text-fill-color: inherit !important;
        background-color: transparent !important;
        background: transparent !important;
      }
    }
    
    &:hover {
      background: var(--color-bg-tertiary) !important;
      box-shadow: none !important;
      border: none !important;
      
      input {
        background: transparent !important;
        background-color: transparent !important;
        
        &:-webkit-autofill,
        &:-webkit-autofill:hover,
        &:-webkit-autofill:focus,
        &:-webkit-autofill:active {
          -webkit-box-shadow: 0 0 0 30px transparent inset !important;
          background-color: transparent !important;
        }
      }
    }
    
    &:focus,
    &.ant-input-focused,
    &:focus-visible,
    &:focus-within {
      background: #ffffff !important;
      box-shadow: 0 0 0 2px rgba(var(--color-primary-500-rgb), 0.2) !important;
      border: none !important;
      outline: none !important;
      
      input {
        background: transparent !important;
        background-color: transparent !important;
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
        
        &:-webkit-autofill,
        &:-webkit-autofill:hover,
        &:-webkit-autofill:focus,
        &:-webkit-autofill:active {
          -webkit-box-shadow: 0 0 0 30px transparent inset !important;
          background-color: transparent !important;
          border: none !important;
        }
      }
    }
  }
  
  // 直接的input元素 - 强制透明
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="tel"],
  input[type="date"] {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    
    &:focus,
    &:focus-visible,
    &:active {
      background: transparent !important;
      background-color: transparent !important;
      border: none !important;
      outline: none !important;
      box-shadow: none !important;
    }
  }
  
  // 特别针对账号和密码字段
  input[name="account"],
  input[name="username"],
  input[name="password"],
  input[name="confirmPassword"] {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    
    &:focus,
    &:focus-visible,
    &:active,
    &:hover {
      background: transparent !important;
      background-color: transparent !important;
      border: none !important;
      outline: none !important;
      box-shadow: none !important;
    }
  }
  
  // 上传组件外部容器移除边框 - 强化版本
  .ant-upload-wrapper,
  .ant-upload-list,
  .ant-form-item-control-input,
  .ant-form-item-control-input-content,
  .ant-upload-list-item,
  .ant-upload-select,
  .ant-upload-drag {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  
  // 特别针对头像上传的表单项
  .ant-form-item:has(.avatar-uploader) {
    .ant-form-item-control-input,
    .ant-form-item-control-input-content {
      border: none !important;
      background: transparent !important;
    }
  }
}

.register-modal-container {
  display: flex;
  flex-direction: column;
  height: 80vh;
  max-height: 80vh;
}

// 固定的标题区域
.register-modal-header {
  flex-shrink: 0;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--color-border-light);
  background: var(--color-bg-primary);
  
  h3 {
    margin: 0;
    color: var(--color-text-primary);
  }
}

// 可滚动的表单区域
.register-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  min-height: 0; // 重要：允许flex子元素收缩
  
  // 自定义滚动条样式
  &::-webkit-scrollbar {
    width: 6px;
  }
  
  &::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
    border-radius: 3px;
  }
  
  &::-webkit-scrollbar-thumb {
    background: var(--color-border-default);
    border-radius: 3px;
    
    &:hover {
      background: var(--color-primary-400);
    }
  }
  
  // Firefox滚动条样式
  scrollbar-width: thin;
  scrollbar-color: var(--color-border-default) var(--color-bg-secondary);
  
  // 表单样式优化
  .ant-form-item {
    margin-bottom: 16px;
    
    &:last-child {
      margin-bottom: 0;
    }
    
    .ant-form-item-label {
      padding-bottom: 6px;
      
      label {
        font-size: 14px;
        font-weight: 500;
        color: var(--color-text-primary);
      }
    }
    
    .ant-form-item-control {
      .ant-input,
      .ant-input-password,
      .ant-select-selector,
      .ant-input-affix-wrapper {
        font-size: 14px !important;
        border-radius: 6px !important;
        border: none !important;
        outline: none !important;
        background: var(--color-bg-secondary) !important;
        backdrop-filter: none !important;
        box-shadow: none !important;
        
        // 内部input元素透明
        input {
          background: transparent !important;
          border: none !important;
          outline: none !important;
        }
        
        &:hover {
          background: var(--color-bg-tertiary) !important;
          border: none !important;
          
          input {
            background: transparent !important;
          }
        }
        
        &:focus,
        &.ant-input-focused,
        &:focus-visible,
        &:focus-within {
          background: #ffffff !important;
          box-shadow: 0 0 0 2px rgba(var(--color-primary-500-rgb), 0.2) !important;
          border: none !important;
          outline: none !important;
          
          input {
            background: transparent !important;
            background-color: transparent !important;
            border: none !important;
            outline: none !important;
            box-shadow: none !important;
          }
        }
      }
      
      // 直接的input元素
      input {
        background: transparent !important;
        border: none !important;
        outline: none !important;
      }
      
      // 上传组件特殊处理
      .ant-upload-wrapper,
      .ant-upload-list,
      .ant-upload-select {
        border: none !important;
        background: transparent !important;
      }
      
      // 选择框特殊处理 - 与输入框保持同高度
      .ant-select {
        .ant-select-selector {
          height: 32px !important;
          line-height: 30px !important;
          padding: 4px 11px !important;
        }
        
        .ant-select-selection-item {
          line-height: 30px !important;
        }
      }
    }
  }
  
  // 头像上传区域
  .avatar-uploader {
    margin-bottom: 12px;
    border: none !important;
    background: transparent !important;
    
    // 移除所有可能的外部边框
    .ant-upload-wrapper,
    .ant-upload-list,
    .ant-form-item-control-input,
    .ant-form-item-control-input-content {
      border: none !important;
      background: transparent !important;
    }
    
    .ant-upload {
      width: 56px !important;
      height: 56px !important;
      border-radius: 50% !important;
      border: 1px dashed var(--color-border-default) !important;
      transition: all 0.3s ease;
      background: transparent !important;
      
      &:hover {
        border-color: var(--color-primary-500) !important;
      }
      
      .ant-upload-select {
        width: 56px !important;
        height: 56px !important;
        border-radius: 50% !important;
        border: none !important;
        background: transparent !important;
      }
    }
  }
}

// 固定的按钮区域
.register-modal-footer {
  flex-shrink: 0;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--color-border-light);
  background: var(--color-bg-primary);
  
  .ant-space {
    width: 100%;
    
    .ant-space-item {
      flex: 1;
      
      .ant-btn {
        width: 100%;
        height: 44px;
        font-weight: 500;
        border-radius: 8px;
        transition: all 0.3s ease;
        
        &.ant-btn-primary {
          background: var(--color-primary-500) !important;
          border-color: var(--color-primary-500) !important;
          box-shadow: 0 4px 12px rgba(var(--color-primary-500-rgb), 0.3) !important;
          
          &:hover {
            transform: translateY(-1px) !important;
            background: var(--color-primary-400) !important;
            border-color: var(--color-primary-400) !important;
            box-shadow: 0 6px 16px rgba(var(--color-primary-500-rgb), 0.4) !important;
          }
          
          &:active {
            transform: translateY(0) !important;
          }
        }
        
        &:not(.ant-btn-primary) {
          background: var(--color-bg-primary) !important;
          border-color: var(--color-border-default) !important;
          color: var(--color-text-primary) !important;
          backdrop-filter: none !important;
          box-shadow: none !important;
          
          &:hover {
            background: var(--color-bg-secondary) !important;
            border-color: var(--color-primary-400) !important;
            color: var(--color-primary-500) !important;
            transform: none !important;
            box-shadow: none !important;
          }
        }
      }
    }
  }
}

// 移动端适配
@media (max-width: 768px) {
  .register-modal {
    .ant-modal-content {
      margin: 8px;
      max-height: calc(100vh - 16px) !important;
    }
    
    .ant-modal-body {
      height: calc(100vh - 16px);
      max-height: calc(100vh - 16px);
    }
  }
  
  .register-modal-container {
    height: calc(100vh - 16px);
    max-height: calc(100vh - 16px);
  }
  
  .register-modal-header {
    padding: 16px 20px 12px;
  }
  
  .register-modal-body {
    padding: 16px 20px;
    
    .ant-form-item {
      margin-bottom: 12px;
      
      .ant-form-item-control {
        .ant-input,
        .ant-input-password,
        .ant-select-selector {
          height: 36px;
          font-size: 13px;
        }
      }
    }
  }
  
  .register-modal-footer {
    padding: 12px 20px 16px;
    
    .ant-btn {
      height: 40px !important;
      font-size: 14px;
    }
  }
}